<template>
  <div class="uni-head uni-flex">
    当前展示楼层：
    <div class="uni-item">员工 <span class="uni-online">{{userType1}}</span>人</div>
   <!-- <div class="uni-item">访客 <span class="uni-online">{{userType2}}</span>人</div>
    <div class="uni-item">临时工 <span class="uni-online">{{userType3}}</span>人</div> -->
  </div>
</template>

<script>
  export default {
    name: 'LoraHead',
    components: {
    },
    data() {
      return {
        userType1: 0,
        userType2: 0,
        userType3: 0,
        userType4: 0
      }
    },
    // computed: {
    //   userTypeList: {
    //     get () {
    //       return this.$dictUtils.getDictList("lora_user_type")
    //     }
    //   }
    // },
    methods: {
      setUserList(users){
        this.userType1 = 0;
        this.userType2 = 0;
        this.userType3 = 0;
        this.userType4 = 0;
        for(var i=0; i<users.length; i++) {
          if(users[i].userType === "1") {
            this.userType1++
          }else if(users[i].userType === "2") {
            this.userType2++
          }else if(users[i].userType === "3") {
            this.userType3++
          }else if(users[i].userType === "4") {
            this.userType4++
          }
        }
      }
    }
  }
</script>
<style scoped>
  .uni-head {
    border-bottom: 1px solid #EBEEF5;
    height: 40px;
    align-items: center;
    padding: 0px 10px;
    line-height: 40px;
    justify-content: flex-end;
    color: #9ea7b4;
  }
  .uni-item {
    margin-left: 15px;
    color: #9ea7b4;
  }
  .uni-online {
    color: #1d9d81;
  }
  .uni-total {
    color: #9ea7b4;
  }
</style>
